Fix patrolling checks, which are using the expensive version of userCan, and therefor...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 28 Jan 2009 23:37:42 +0000 (23:37 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 28 Jan 2009 23:37:42 +0000 (23:37 +0000)
includes/Article.php

index 4f3125e..d5ed3bd 100644 (file)
@@ -996,7 +996,7 @@ class Article {
                # Only diffs and new page links from RC give rcid params, so if
                # we are just viewing the page normally with no rcid, try to find it. 
                # This is more convenient for users.
-               if( $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) {
+               if( $this->mTitle->exists() && $this->mTitle->userCan('patrol', false) ) {
                        if( empty($rcid) ) {
                                $firstRev = $this->mTitle->getFirstRevision();
                                $rcid = $firstRev ? $firstRev->isUnpatrolled() : 0;
@@ -1008,7 +1008,7 @@ class Article {
                }
                # If we have been passed an &rcid= parameter, we want to give the user a
                # chance to mark this new article as patrolled.
-               if( !empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) {
+               if( !empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol', false) ) {
                        $wgOut->addHTML(
                                "<div class='patrollink'>" .
                                        wfMsgHtml( 'markaspatrolledlink',